﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CWCS.Entity.Robot
{
   public class RobotInfo:EquipmentBase
   {
        #region  设备DB块信息
        public string robotnum;//机器人编号
        public string robotName;//机器人编号
        public string name;//机器人编号
        public int start;
        public int length;
        public string stationno;
        public int stationtype;//1 装盘 ；2 拆盘
        public string relaseMode;//1 整盘解绑  2 单电芯解绑
        public string key_ip;
        public int DBAddress;
        public string belong;
        public List<string> lstStation = new List<string>();//组盘站台
        #endregion
        public string rbbarcode;//当前托盘
        public string wcstaskno;//WCS任务号
        public int rbtaskno;//机器人任务号 0，无任务；1，装盘中；2，装盘完成(RB清0)
        public int rbstate;//机器人运行状态 0，未启动；1，自动；2，手动；3，故障
        public int rbpickstate;//机器人装盘状态 0， 无任务；1,装盘中； 2，装盘完成(RB清0)
        public int rbnumber;//当前装盘数量或者未拆完量
        public int trayreading;//拆盘申请 
        public int heart;//心跳
        public int checkbarcodereading;//机器人装盘条码读取信号
        public int inplacebarcodereading;//机器人电芯到位条码读取信号
        public int pickbarcodereading;//机器人装盘完成读取信号
        public int beginvale;//机器人工位开始偏移量
        public int workstation;//工位位置  1,2
        public int alarmCode;//故障代码
        public int barcode1ng;//电芯条码1
        public int barcode2ng;//电芯条码2
        public int barcode3ng;//电芯条码3
        public int barcode4ng;//电芯条码4
        public string zonecode ;//区域
        public string technologycode;//工艺
        public string barcode1;//校验条码1
        public string barcode2;//校验条码2
        public string barcode3;//校验条码3
        public string barcode4;//校验条码4

        public List<string> positions { get; set; }

        public List<string> BarCodeList { get; set; }
        public List<string> ResultList { get; set; }

        public RobotInfo()
        {
            BarCodeList = new List<string>();
            positions = new List<string>();
            ResultList = new List<string>();
        }
        private List<BatteryInfo> _lstBattery = new List<BatteryInfo>();//电芯条码

        public List<BatteryInfo> LstBattery
        {
            get { return _lstBattery; }
            set { _lstBattery = value; }
        }

        public bool m_ConnectStatus = false;
        public int rbpickcount;//拆盘数量
        public string ZoneCode;//库区
        public string ZoneId;
        public string traycode = "";
        public int cellNum;//电芯数量 夹爪爪数或托盘内数量

        public class RobotMsg
        {
            public string type { get; set; }
            public string Msg { get; set; }
        }
    }
}
